<?php
    header('Content_Type:application/json');
    $output = [];
    $did = $_REQUEST['did'];
    $conn = mysqli_connect('127.0.0.1','root','','flower');
    $sql = 'SET NAMES UTF8';
    mysqli_query($conn,$sql);
    $sql = "SELECT did,title_1,text_1,img_1,img_2,text_2,title_2,text_3,img_3,text_4,img_4,text_5,img_5,text_6,img_6,text_7,img_7,text_8,img_8,title_3,text_9_1,text_9_2,text_9_3 FROM fl_products WHERE did=$did ";
    $result = mysqli_query($conn,$sql);
    while(true){
     $row = mysqli_fetch_assoc($result);
        if(!$row){
            break;
        };
     $output[]=$row;
    };
    echo json_encode($output);
?>